package com.example.orderservice.listener;


import com.example.orderservice.model.UserInfo;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "order.create")
public class OrderListener {

    @RabbitHandler
    public void ListenerQueue(String message) {
        System.out.println("接收到的消息：" + message);
    }

    @RabbitHandler
    public void ListenerQueue(UserInfo message) {
        System.out.println("接收到的消息：" + message);
    }
}
